<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Netkk.Models.DownloadListModel>" %>
<%@ Import Namespace="Netkk.Core"%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Downloads</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Downloads</h2>
    <p>
        <%= Html.PagerLinks("Download", "Index", Model.TotalPages, Model.CurrentPage, "pager", "more", "")%></p>
    <% foreach (var item in Model.Downloads)
       { %>
    <h3>
        <%= Html.Encode(item.Name) %></h3>
    <p>
        <%= Html.Encode(item.Description) %></p>
    <p>
        <a href="<%=Html.Action("Download", "Download", item.Id)%>" class="dlpowerpoint button">Herunterladen</a>
        <%
            if (Model.ShowCreateDownload)
            {
        %>
        <a href="<%=Html.Action("Download", "Edit", item.Id)%>" class="edit button">Bearbeiten</a>
        <%
            }%>
    </p>
    <% } %>
    <p>
        <%= Html.PagerLinks("Download", "Index", Model.TotalPages, Model.CurrentPage, "pager", "more", "")%></p>
    <%
        if (Model.ShowCreateDownload)
        {
    %>
    <p>
        &nbsp;</p>
    <p>
        <a href="<%=Html.Action("Download", "Create")%>" class="websiteadd button">Neuen Download erstellen</a></p>
    <%
        }%>
</asp:Content>
